package com.example.demo.service.impl;

import com.example.demo.dao.FoodManager;
import com.example.demo.entity.Food;
import com.example.demo.service.FreshKitchenService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

/**
 * @author cc
 * @date 2018/9/19 15:05
 */
@Service
@Transactional
public class FreshKitchenServiceImpl implements FreshKitchenService {
    private final FoodManager foodManager;

    @Autowired
    public FreshKitchenServiceImpl(FoodManager foodManager) {
        this.foodManager = foodManager;
    }

    @Override
    public Food cookFresh(Food food) {
        String foodName = food.getFoodName();
        switch (foodName) {
            case "鱼":
                return cookFish();
            default:
                return null;
        }
    }

    // TODO: 2018/9/22
    private Food cookFish() {
        return null;
    }
}
